package com.lei.zjs.service.ebo;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lei.zjs.dao.RegionDao;
import com.lei.zjs.service.ebi.RegionService;
import com.lei.zjs.vo.PageBean;
import com.lei.zjs.vo.Region;

@Service
@Transactional
public class RegionServiceImpl implements RegionService{

	@Resource
	private RegionDao regionDao;

	@Override
	public void importExcel(List<Region> list) {
		for (Region region : list) {
			regionDao.batchSave(region);
		}
	}

	@Override
	public void pageQuery(PageBean pageBean) {
		regionDao.pageQuery(pageBean);
	}

	@Override
	public void save(Region model) {
		regionDao.save(model);
	}

	@Override
	public Region getOneRegion(String id) {
		return regionDao.findById(id);
	}

	@Override
	public void update(Region model) {
		regionDao.update(model);
	}

	@Override
	public List<Region> findAll() {
		return regionDao.findAll();
	}
}
